import {
    Request
} from "../utils/request";

export const authApi = {
    login: (data) => Request.post('/user/login', data, false),
    logout: (data) => Request.post(`/user/logout/${data}`),
    register: (data) => Request.post('/user/wxRegist', data),
    wxLogin: (code) => Request.post("/user/wxLogin", { code: code }, false),
    wxUnBind: (userId) => Request.delete(`/user/wxUnbind/${userId}`),
    wxBind: (userId, code) => Request.post(`/user/wxBind/${userId}`, {code: code}),
    getUserInfoById: (userId) => Request.get(`/user/${userId}`),
}